﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using GalaSoft.MvvmLight.Messaging;
using LogWare.Messages;
using LogWare.Properties;
using Ookii.Dialogs.Wpf;

namespace LogWare.Views {
	/// <summary>
	/// Interaction logic for Options.xaml
	/// </summary>
	public partial class Options : Window {
		public Options() {
			InitializeComponent();
			Messenger.Default.Register<ChildViewMessage<string>>(this, message => {
				VistaFolderBrowserDialog dialog = new VistaFolderBrowserDialog();
				bool ? result=dialog.ShowDialog();
				message.Callback(new ChildViewResult<string> {
					UserAction = result==true?MessageBoxResult.OK:MessageBoxResult.Cancel,
					UserData = dialog.SelectedPath
				});
			});
		}

		private void OKBtn_Click(object sender, RoutedEventArgs e) {
			DialogResult = true;
		}

	}
}
